class Solution:
def canReach(self, arr: List[int], start: int) -> bool:
visited = {}
def trav(point):
if point in visited:
return False
if point <0:
return False
if point > len(arr)-1:
return False
visited[point] = True
if arr[point] == 0:
return True
return trav(point+arr[point]) or trav(point - arr[point])
return trav(start)
Differences of the permutations | Doctor's Secret |
Back to School | I am Easy |
Teddy and Tweety | Partitioning binary strings |
Special sets | Smallest chosen word |
Going to office | Color the boxes |
Missing numbers | Maximum sum |
13 Reasons Why | Friend's Relationship |
Health of a person | Divisibility |
A. Movement | Numbers in a matrix |
Sequences | Split houses |
Divisible | Three primes |
Coprimes | Cost of balloons |
One String No Trouble | Help Jarvis! |
Lift queries | Goki and his breakup |
Ali and Helping innocent people | Book of Potion making |